Optimal. Leaf size=137 \[ -\frac {33 a^3 x}{8}-\frac {3 a^3 \tanh ^{-1}(\cos (c+d x))}{2 d}+\frac {2 a^3 \cos (c+d x)}{d}+\frac {a^3 \cos ^3(c+d x)}{d}-\frac {3 a^3 \cot (c+d x)}{d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d}-\frac {7 a^3 \cos (c+d x) \sin (c+d x)}{8 d}-\frac {a^3 \cos (c+d x) \sin ^3(c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 137, normalized size of antiderivative = 1.00, number of steps
used = 15, number of rules used = 8, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {2951, 3855,
3852, 8, 3853, 2718, 2715, 2713} \begin {gather*} \frac {a^3 \cos ^3(c+d x)}{d}+\frac {2 a^3 \cos (c+d x)}{d}-\frac {3 a^3 \cot (c+d x)}{d}-\frac {a^3 \sin ^3(c+d x) \cos (c+d x)}{4 d}-\frac {7 a^3 \sin (c+d x) \cos (c+d x)}{8 d}-\frac {3 a^3 \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d}-\frac {33 a^3 x}{8} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2713
Rule 2715
Rule 2718
Rule 2951
Rule 3852
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \cos (c+d x) \cot ^3(c+d x) (a+a \sin (c+d x))^3 \, dx &=\frac {\int \left (-5 a^7+a^7 \csc (c+d x)+3 a^7 \csc ^2(c+d x)+a^7 \csc ^3(c+d x)-5 a^7 \sin (c+d x)+a^7 \sin ^2(c+d x)+3 a^7 \sin ^3(c+d x)+a^7 \sin ^4(c+d x)\right ) \, dx}{a^4}\\ &=-5 a^3 x+a^3 \int \csc (c+d x) \, dx+a^3 \int \csc ^3(c+d x) \, dx+a^3 \int \sin ^2(c+d x) \, dx+a^3 \int \sin ^4(c+d x) \, dx+\left (3 a^3\right ) \int \csc ^2(c+d x) \, dx+\left (3 a^3\right ) \int \sin ^3(c+d x) \, dx-\left (5 a^3\right ) \int \sin (c+d x) \, dx\\ &=-5 a^3 x-\frac {a^3 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {5 a^3 \cos (c+d x)}{d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d}-\frac {a^3 \cos (c+d x) \sin (c+d x)}{2 d}-\frac {a^3 \cos (c+d x) \sin ^3(c+d x)}{4 d}+\frac {1}{2} a^3 \int 1 \, dx+\frac {1}{2} a^3 \int \csc (c+d x) \, dx+\frac {1}{4} \left (3 a^3\right ) \int \sin ^2(c+d x) \, dx-\frac {\left (3 a^3\right ) \text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{d}-\frac {\left (3 a^3\right ) \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {9 a^3 x}{2}-\frac {3 a^3 \tanh ^{-1}(\cos (c+d x))}{2 d}+\frac {2 a^3 \cos (c+d x)}{d}+\frac {a^3 \cos ^3(c+d x)}{d}-\frac {3 a^3 \cot (c+d x)}{d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d}-\frac {7 a^3 \cos (c+d x) \sin (c+d x)}{8 d}-\frac {a^3 \cos (c+d x) \sin ^3(c+d x)}{4 d}+\frac {1}{8} \left (3 a^3\right ) \int 1 \, dx\\ &=-\frac {33 a^3 x}{8}-\frac {3 a^3 \tanh ^{-1}(\cos (c+d x))}{2 d}+\frac {2 a^3 \cos (c+d x)}{d}+\frac {a^3 \cos ^3(c+d x)}{d}-\frac {3 a^3 \cot (c+d x)}{d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d}-\frac {7 a^3 \cos (c+d x) \sin (c+d x)}{8 d}-\frac {a^3 \cos (c+d x) \sin ^3(c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.96, size = 164, normalized size = 1.20 \begin {gather*} \frac {(a+a \sin (c+d x))^3 \left (-132 (c+d x)+88 \cos (c+d x)+8 \cos (3 (c+d x))-48 \cot \left (\frac {1}{2} (c+d x)\right )-4 \csc ^2\left (\frac {1}{2} (c+d x)\right )-48 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+48 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 \sec ^2\left (\frac {1}{2} (c+d x)\right )-16 \sin (2 (c+d x))+\sin (4 (c+d x))+48 \tan \left (\frac {1}{2} (c+d x)\right )\right )}{32 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^6} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 196, normalized size = 1.43
method | result | size |
derivativedivides | \(\frac {a^{3} \left (-\frac {\cos ^{5}\left (d x +c \right )}{2 \sin \left (d x +c \right )^{2}}-\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{2}-\frac {3 \cos \left (d x +c \right )}{2}-\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+3 a^{3} \left (-\frac {\cos ^{5}\left (d x +c \right )}{\sin \left (d x +c \right )}-\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+3 a^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{3}+\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+a^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(196\) |
default | \(\frac {a^{3} \left (-\frac {\cos ^{5}\left (d x +c \right )}{2 \sin \left (d x +c \right )^{2}}-\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{2}-\frac {3 \cos \left (d x +c \right )}{2}-\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+3 a^{3} \left (-\frac {\cos ^{5}\left (d x +c \right )}{\sin \left (d x +c \right )}-\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+3 a^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{3}+\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+a^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(196\) |
risch | \(-\frac {33 a^{3} x}{8}+\frac {a^{3} {\mathrm e}^{3 i \left (d x +c \right )}}{8 d}+\frac {i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}}{4 d}+\frac {11 a^{3} {\mathrm e}^{i \left (d x +c \right )}}{8 d}+\frac {11 a^{3} {\mathrm e}^{-i \left (d x +c \right )}}{8 d}-\frac {i a^{3} {\mathrm e}^{-2 i \left (d x +c \right )}}{4 d}+\frac {a^{3} {\mathrm e}^{-3 i \left (d x +c \right )}}{8 d}+\frac {a^{3} \left ({\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}-6 i {\mathrm e}^{2 i \left (d x +c \right )}+6 i\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}+\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}+\frac {a^{3} \sin \left (4 d x +4 c \right )}{32 d}\) | \(222\) |
norman | \(\frac {\frac {5 a^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {a^{3}}{8 d}-\frac {3 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d}-\frac {25 a^{3} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {27 a^{3} \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {27 a^{3} \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {25 a^{3} \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {3 a^{3} \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {a^{3} \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {33 a^{3} x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}-\frac {33 a^{3} x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {99 a^{3} x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}-\frac {33 a^{3} x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {33 a^{3} x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {15 a^{3} \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {69 a^{3} \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {91 a^{3} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {3 a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}\) | \(348\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 183, normalized size = 1.34 \begin {gather*} \frac {16 \, {\left (2 \, \cos \left (d x + c\right )^{3} + 6 \, \cos \left (d x + c\right ) - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} a^{3} + {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3} - 48 \, {\left (3 \, d x + 3 \, c + \frac {3 \, \tan \left (d x + c\right )^{2} + 2}{\tan \left (d x + c\right )^{3} + \tan \left (d x + c\right )}\right )} a^{3} + 8 \, a^{3} {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - 4 \, \cos \left (d x + c\right ) + 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{32 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 185, normalized size = 1.35 \begin {gather*} \frac {8 \, a^{3} \cos \left (d x + c\right )^{5} - 33 \, a^{3} d x \cos \left (d x + c\right )^{2} + 8 \, a^{3} \cos \left (d x + c\right )^{3} + 33 \, a^{3} d x - 12 \, a^{3} \cos \left (d x + c\right ) - 6 \, {\left (a^{3} \cos \left (d x + c\right )^{2} - a^{3}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 6 \, {\left (a^{3} \cos \left (d x + c\right )^{2} - a^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left (2 \, a^{3} \cos \left (d x + c\right )^{5} - 11 \, a^{3} \cos \left (d x + c\right )^{3} + 33 \, a^{3} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.67, size = 241, normalized size = 1.76 \begin {gather*} \frac {a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 33 \, {\left (d x + c\right )} a^{3} + 12 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 12 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {18 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}} + \frac {2 \, {\left (7 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 40 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 72 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 56 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 7 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 24 \, a^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.81, size = 347, normalized size = 2.53 \begin {gather*} \frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}+\frac {3\,a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d}+\frac {33\,a^3\,\mathrm {atan}\left (\frac {1089\,a^6}{16\,\left (\frac {99\,a^6}{4}+\frac {1089\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}\right )}-\frac {99\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,\left (\frac {99\,a^6}{4}+\frac {1089\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}\right )}\right )}{4\,d}+\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\frac {79\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{2}-9\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+70\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-51\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+53\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-31\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+22\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-6\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {a^3}{2}}{d\,\left (4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+16\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+24\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+16\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}+\frac {3\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________